{namespace n=Tx_News_ViewHelpers}<!--
	=====================
		Partials/List/Item.html
-->
<div class="article articletype-{newsItem.type}{f:if(condition: newsItem.istopnews, then: ' topnews')}">
	<n:excludeDisplayedNews newsItem="{newsItem}" />
	<!-- header -->
	<div class="header">
		<h2>
			<n:link newsItem="{newsItem}" settings="{settings}">
				{newsItem.title}
			</n:link>
		</h2>
		
		<!-- date -->
		<span class="news-list-date">
			<n:format.date format="{f:translate(key:'dateFormat')}">{newsItem.datetime}</n:format.date>
		</span>
	</div>

	<f:if condition="{newsItem.falMedia}">
		<!-- fal media preview element -->
		<f:then>
			<div class="news-img-wrap">
				<f:if condition="{newsItem.falMediaPreviews}">
					<f:then>
						<n:link newsItem="{newsItem}" settings="{settings}">
							<f:alias map="{mediaElement: newsItem.falMediaPreviews.0}">
								<f:if condition="{mediaElement.originalResource.type} == 2">
									<f:image class="img-responsive" src="{mediaElement.uid}" treatIdAsReference="1" title="{mediaElement.originalResource.title}" alt="{mediaElement.originalResource.alternative}" maxWidth="{settings.list.media.image.maxWidth}" maxHeight="{settings.list.media.image.maxHeight}" />
								</f:if>
								<f:if condition="{mediaElement.originalResource.type} == 4">
									<f:render partial="Detail/FalMediaVideo" arguments="{mediaElement: mediaElement}" />
								</f:if>
							</f:alias>
						</n:link>
					</f:then>
					<f:else>
						<f:if condition="{settings.displayDummyIfNoMedia}">
							<span class="no-media-element">
								<n:link newsItem="{newsItem}" settings="{settings}">
									<f:image class="img-responsive" src="{settings.list.media.dummyImage}" title="" alt="" maxWidth="{settings.list.media.image.maxWidth}" maxHeight="{settings.list.media.image.maxHeight}" />
								</n:link>
							</span>
						</f:if>
					</f:else>
				</f:if>

			</div>
		</f:then>
		<f:else>

			<f:if condition="{newsItem.media}">
				<!-- media preview element -->
				<f:then>
					<div class="news-img-wrap">
						<f:if condition="{newsItem.mediaPreviews}">
							<f:then>
								<n:link newsItem="{newsItem}" settings="{settings}">
									<f:alias map="{mediaElement: newsItem.mediaPreviews.0}">
										<f:if condition="{mediaElement.type} == 0">
											<f:image class="img-responsive" src="uploads/tx_news/{mediaElement.image}" title="{mediaElement.title}" alt="{mediaElement.alt}" maxWidth="{settings.list.media.image.maxWidth}" maxHeight="{settings.list.media.image.maxHeight}" />
										</f:if>
										<f:if condition="{mediaElement.type} == 1">
											<f:render partial="Detail/MediaVideo" arguments="{mediaElement: mediaElement}" />
										</f:if>
										<f:if condition="{mediaElement.type} == 2">
											<f:render partial="Detail/MediaHtml" arguments="{mediaElement: mediaElement}" />
										</f:if>
									</f:alias>
								</n:link>
							</f:then>
							<f:else>
								<f:if condition="{settings.displayDummyIfNoMedia}">
							<span class="no-media-element">
								<n:link newsItem="{newsItem}" settings="{settings}">
									<f:image class="img-responsive" src="{settings.list.media.dummyImage}" title="" alt="" maxWidth="{settings.list.media.image.maxWidth}" maxHeight="{settings.list.media.image.maxHeight}" />
								</n:link>
							</span>
								</f:if>
							</f:else>
						</f:if>

					</div>
				</f:then>
				<f:else>
					<f:if condition="{settings.displayDummyIfNoMedia}">
						<f:then>
							<div class="news-img-wrap">
								<n:link newsItem="{newsItem}" settings="{settings}">
							<span class="no-media-element">
								<f:image src="{settings.list.media.dummyImage}" title="" alt="" maxWidth="{settings.list.media.image.maxWidth}" maxHeight="{settings.list.media.image.maxHeight}" />
							</span>
								</n:link>
							</div>
						</f:then>
					</f:if>
				</f:else>
			</f:if>

		</f:else>
	</f:if>

	<!-- teas=ser text -->
	<div class="teaser-text">
		<f:if condition="{newsItem.teaser}">
			<f:then>
				<f:format.html>{newsItem.teaser}</f:format.html>
			</f:then>
			<f:else>
				<f:format.html>{newsItem.bodytext}</f:format.html>
			</f:else>
		</f:if>
		<n:link newsItem="{newsItem}" settings="{settings}" class="more">
			<f:translate key="more-link" />
		</n:link>
	</div>
</div>